package com.example.forum.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class RouterController {

    // 处理所有前端路由，将它们重定向到index.html
    @GetMapping(value = {"/", "/home", "/article", "/details", "/profile", "/settings", "/result"})
    public String forwardToIndex() {
        return "forward:/index.html";
    }
}